from lwpgt.render2d import GameObject

class Entity(GameObject):
    """class for represent entity"""
    def __init__(self, tile):
        GameObject.__init__(self, tile)
    
    def Draw(self, surface, camera):
        """redraw entity on the given surface at given position"""
        if self.tile.image!=None:
            self.tile.Draw(surface, (self.rect.x-camera.rect.x, self.rect.y-camera.rect.y))
